package com.ejlchina.tool.network

import android.os.Parcelable
import kotlinx.parcelize.Parcelize


data class CommonResponse<T>(val code: Int, val message: String, val data: T?)
data class LoginResBody(
    val accessToken: String,
    val refreshToken: String,
    private val expiresIn: Int = 0,
    val expiresAt: Long
)

data class RemoteCtrlBoardVersion(
    val url: String,
    val verNo: String,
    val size: Int
)

@Parcelize
data class BucketIndexInfo(
    val mac: String,
    var bucketNo: Int = -1,//-1表示未设置
    var deviceNo: String = ""
) : Parcelable {
    fun getBucketNoString(): String{
        return if (bucketNo == -1) "" else "$bucketNo#"
    }
}

@Parcelize
data class IndexFixUpdateFailBean(
    val bucketNo: String,
    val deviceNo: String,
    val errMsg: String,
    val firmwareVer: String,
    val hardwareVer: String,
    val mac: String,
    val status: Boolean
): Parcelable

data class IndexFixCheckResBean(
    val errMsg: String,
    val status: Boolean
)